<!DOCTYPE html>
<html>
  <head>
    <title>steps</title>
    <meta charset="utf-8" />
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      body,
      html {
        width: 100%;
        height: 100%;
      }

      body {
        background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
          url(./bg.png);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
      }
      .container {
        width: 360px;
        height: 400px;
        background-color: #eee;
        border-radius: 5px;
        overflow: hidden;
        margin: 8% auto;
        position: relative;
      }

      h3 {
        text-align: center;
        margin-bottom: 40px;
        color: #777;
      }
      .container form {
        width: 280px;
        position: absolute;
        top: 100px;
        left: 40px;
        transition: 0.5s;
      }

      form input {
        width: 100%;
        padding: 10px 5px;
        margin: 5px 0;
        border: 0;
        border-bottom: 1px solid #999;
        outline: none;
        background: transparent;
      }

      ::placeholder {
        color: #777;
      }

      .btn-box {
        width: 100%;
        margin: 30px auto;
        text-align: center;
      }

      form button {
        width: 110px;
        height: 35px;
        margin: 0 10px;
        background: linear-gradient(to right, #ff105f, #ffad06);
        border-radius: 30px;
        border: 0;
        outline: none;
        color: #fff;
        cursor: pointer;
      }

      #Form2 {
        left: 450px;
      }

      #Form3 {
        left: 450px;
      }

      .step-row {
        width: 360px;
        height: 40px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        box-shadow: 0 -1px 5px -1px #000;
        position: relative;
      }
      .step-col {
        width: 120px;
        text-align: center;
        color: #333;
        position: relative;
      }

      #progress {
        position: absolute;
        height: 100%;
        width: 120px;
        background: linear-gradient(to right, #ff105f, #ffad06);
        transition: 0.5s;
      }

      #progress::after {
        content: "";
        height: 0;
        width: 0;
        border-top: 20px solid transparent;
        border-bottom: 20px solid transparent;
        position: absolute;
        right: -20px;
        top: 0;
        border-left: 20px solid #ffad06;
      }

      .text {
        width: 400px;
        height: 40px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .text-item {
        flex: 1;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <form action="" id="Form1">
        <h3>CREATE ACCOUNT</h3>
        <input type="text" placeholder="Email" required />
        <input type="password" placeholder="Password" required />
        <input type="password" placeholder="Confirm Password" required />
        <div class="btn-box">
          <button type="button" id="Next1">next</button>
        </div>
      </form>

      <form action="" id="Form2">
        <h3>SCCIAL LINKS</h3>
        <input type="text" placeholder="Medium" req uired />
        <input type="text" placeholder="Github" required />
        <input type="text" placeholder="Linkedin" required />
        <div class="btn-box">
          <button type="button" id="Back1">Back</button>
          <button type="button" id="Next2">next</button>
        </div>
      </form>

      <form action="" id="Form3">
        <h3>PERSON INFO</h3>
        <input type="text" placeholder="First Name" required />
        <input type="password" placeholder="Last Name" required />
        <input type="password" placeholder=" Mobile NO." required />
        <div class="btn-box">
          <button type="button" id="Back2">Back</button>
          <button type="button" id="Submit">Submit</button>
        </div>
      </form>

      <div class="step-row">
        <div id="progress"></div>
        <div class="step-col">
          <small>step1</small>
        </div>
        <div class="step-col">
          <small>step2</small>
        </div>
        <div class="step-col">
          <small>step3</small>
        </div>
      </div>
    </div>
    <script>
      var form1 = document.querySelector("#Form1")
      var form2 = document.querySelector("#Form2")
      var form3 = document.querySelector("#Form3")

      var next1 = document.querySelector("#Next1")
      var next2 = document.querySelector("#Next2")

      var back1 = document.querySelector("#Back1")
      var back2 = document.querySelector("#Back2")

      var progress = document.querySelector("#progress")

      next1.onclick = function () {
        form1.style.left = "-450px"
        form2.style.left = "40px"
        progress.style.width = "240px"
      }

      back1.onclick = function () {
        form1.style.left = "40px"
        form2.style.left = "450px"
        progress.style.width = "120px"
      }

      next2.onclick = function () {
        form2.style.left = "-450px"
        form3.style.left = "40px"
        progress.style.width = "360px"
      }

      back2.onclick = function () {
        form2.style.left = "40px"
        form3.style.left = "450px"
        progress.style.width = "240px"
      }
    </script>
  </body>
</html>
